package com.jdz.gxq.info.admin.fund.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.fund.bo.Fund;
import com.jdz.gxq.info.admin.fund.form.EditFundForm;
import com.jdz.gxq.info.admin.fund.service.FundService;
import com.jdz.gxq.info.common.action.CommonAction;

public class EditFundAction extends CommonAction {

	private FundService fundService = null;
	 
	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {
		
		EditFundForm editFundForm = (EditFundForm) form;
	
		Fund fund = fundService.getFundById(editFundForm.getId());
		
		editFundForm.setFund(fund);

		return mapping.findForward("success");
	}

	public void setFundService(FundService fundService) {
		this.fundService = fundService;
	}
}

